package com.uha.reggie.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 员工实体
 */
@Data

@AllArgsConstructor
@NoArgsConstructor

@TableName("employee")
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

//@JsonSerialize 解决Long js 16位精度丢失 转String

    //@JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @TableField("username")
    private String username;

    private String name;

    private String password;

    private String phone;

    private String sex;

    @TableField("id_number")
    private String idNumber;


    private Integer status;


    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

}
